package nan.nanfang.test02;

public class jiaoWuTeacher {
    private String name ;
    private String shcool;

    public jiaoWuTeacher(){
        super();
    }
    public jiaoWuTeacher(String name, String shcool) {
        this.name = name;
        this.shcool = shcool;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShcool() {
        return shcool;
    }

    public void setShcool(String shcool) {
        this.shcool = shcool;
    }

    //运用了多态
    public void anPai(Teacher teacher){
        System.out.println("教务老师职责 -- 在指定的地点");
        System.out.println("教务老师职责 -- 在指定的时间");
        teacher.teach();
    }


    public static void main(String[] args) {
        jiaoWuTeacher jwt = new jiaoWuTeacher("中老师","中");
        javaTeacher zd = new javaTeacher();
        zd.teach();
        //注意：子类实例化父类对象有何特点
        //父类对象只能放访问父类特有的成员，以及访问子类重写父类的成员
    }
}
